package v1;


import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;


import Kernel.Serveur;

public class Sauvegarde {
	
	public static void sauvegarder(Serveur serveur) throws ClassNotFoundException{
		String filename = "fichier.data";
		FileOutputStream fis = null;
		ObjectOutputStream oit = null;
		try
		{
			fis = new FileOutputStream(filename);
			oit = new ObjectOutputStream(fis);
			oit.writeObject(serveur);
			oit.flush();
			oit.close();
		}
		catch(IOException ex)
		{
		ex.printStackTrace();
		}
	}

}
